package com.ibm.cps.message.validation;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.ibm.cps.message.MessageFields;
import com.ibm.util.exception.CPSException;

public class InputProcessorValidator extends IProcessorValidator {

	/**
	 * {"topicname":"stream_data","type":"input","schemaid":
	 * "0000000008e151b18071eae8"
	 * ,"processorid":"0000000000ed66138a01299f","tenantid"
	 * :"123456789012345678901239"}
	 */
	@Override
	public void validatePostMessage(ObjectNode element) throws CPSException {
		ValidatorUtil.commonProcess(element);

		String[] strFields = { MessageFields.TOPICNAME, MessageFields.TYPE,
				MessageFields.SCHEMAID };
		String[] arrFields = { MessageFields.PARENTPROCESSORS };
		ValidatorUtil.validateAllTypeFields(element, strFields, arrFields,
				null, null);

	}
}
